﻿using HashFoo.MigratorFoo.Console;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace HashFoo.MigratorFoo.ConsoleTests
{
    [TestClass]
    public class ParserTests
    {
        [TestMethod]
        [Description("makes sure that an arg that contains the equal value is returned as expected")]
        public void arg_with_equal_char_is_returned()
        {
            const string arg = @"/c:C:\dev\hashfoo\hashfoo_data\src\Nhib.MigratorFooTests\_migrations\migratorfoo.xml";
            var parsed = CommandArgs.Parse(new[] { arg });

            Assert.IsNotNull(parsed);
            Assert.IsNotNull(parsed.ConfigPath);
            Assert.IsNull(parsed.ConfigName);
        }
    }
}
